﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Media;

namespace LaberMediaClient.Dal
{
    internal class LabelManage
    {
        static List<string> labels = new List<string>();
        public static void AddCurrentLabel(ComboBox comboLebal)
        {
            if (!labels.Contains(comboLebal.Text))
            {
                labels.Add(comboLebal.Text);
                comboLebal.Items.Add(comboLebal.Text);
                //comboLebal.ItemsSource = labels;
            }
        }

        public static void ClearLabels(ComboBox comboLebal)
        {
            labels.Clear();
            comboLebal.Items.Clear();
        }

        public static void AddALabel(ComboBox comboLebal,string str)
        {
            if (labels.Contains(str))
                return;
            labels.Add(str);
            comboLebal.Items.Add(str);
        }
       

        public static SolidColorBrush GetLabelColor(ComboBox comboColor)
        {
            var color = Brushes.Red;
            switch (comboColor.Text)
            {
                case "Red":
                    {
                        color = Brushes.Red;
                        break;
                    }
                case "Blue":
                    {
                        color = Brushes.Blue;
                        break;
                    }
                case "Green":
                    {
                        color = Brushes.Green;
                        break;
                    }
                case "Black":
                    {
                        color = Brushes.Black;
                        break;
                    }
            }
            return color;

        }
    }
}
